<table>
  <tr>
    <th>id</th>
    <th>name</th>
    <th>updated_at</th>
	
  </tr>

<% @products.each do |product| %>
  <tr>
    <td><%=h product.id %></td>
    <td><%=h product.names %></td>
    <td><%=h product.updated_at %></td>
    <td><%= link_to "show", product %></td>
    <td><%= link_to "edit", :controller => "products", :action => "edit", :id => product %></td>
	<td><%= link_to 'Destroy', product, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<% content_for :head do %>
	<title>Dump all rows in a table</title>
	<%= stylesheet_link_tag "table" %>
<% end %>
<% content_for :header do %>
	<h1>Display of all products </h1>
<% end %>
<% content_for :footer do %>
	<%= link_to "new", :controller => "products", :action => "new" %>
	<br/>
	<%= link_to "home", :controller => "products", :action => "index" %>
<% end %>